import { MockAdapter } from '../mock-adapter';
const mock = MockAdapter.getInstance();

import Mock from 'mockjs'

const datas: Array<any> = [
        {
        srfkey: 'EXPENSE_PAYMENTWAY',
        emptytext: '未定义',
        "codelisttype":"static",
        items: [
            {
                id: '10',
                label: '报销',
                text: '报销',
                value: '10',
                disabled: false,
            },
            {
                id: '20',
                label: '销账',
                text: '销账',
                value: '20',
                disabled: false,
            },
        ]
    },
    {
        srfkey: 'UsrCodeList0824465552',
        emptytext: '未定义',
        "codelisttype":"static",
        items: [
            {
                id: 'own_account',
                label: '报销人',
                text: '报销人',
                value: 'own_account',
                disabled: false,
            },
            {
                id: 'company_account',
                label: '公司',
                text: '公司',
                value: 'company_account',
                disabled: false,
            },
        ]
    }
];

// 获取全部数组
mock.onGet('./assets/json/data-dictionary.json').reply((config: any) => {
    let status = MockAdapter.mockStatus(config);
    return [status, datas, config.headers, config];
});
